package com.qf.grabtickets.controller;

import com.qf.entity.User;
import com.qf.grabtickets.service.ITUserCouService;
import com.qf.vo.ResultVo;
import jdk.nashorn.internal.parser.Token;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import sun.rmi.runtime.Log;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ljc
 * @since 2023-03-10
 */
@RestController
@RequestMapping("/grab")
@Slf4j
public class UserCouController {

    @Autowired
    ITUserCouService service;
    @RequestMapping("tickets")
    public ResultVo grabTickets(@RequestHeader String Token,@RequestBody User user) throws Exception {
        log.debug("user:{}",user);
        return service.grabTickets(Token,user);
    }
}
